<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!doctype html>
<html dir="ltr" lang="en">
<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
  <link rel="stylesheet" href="chrome://resources/css/roboto.css">

  <link rel="stylesheet" href="attribution_internals.css">
  <script type="module" src="attribution_internals.js"></script>
  <title>Attribution Reporting API Internals</title>
</head>
<body>
<header>
<h1>Attribution Reporting API Internals</h1>
<p>Attribution Reporting is currently <span id="feature-status-content" class="disabled">disabled</span> in this browser.
<p><code>Attribution-Reporting-Support</code> is <strong><span id="attribution-support">web</span></strong> in this browser.
<p id="debug-mode-content"></p>
<button id="refresh">Refresh all page data</button>
<button id="clear-data">Clear all attribution data</button>
</header>
<main>
  <cr-tab-box hidden>
    <div id="sources-tab" slot="tab">Active Sources</div>
    <div id="source-registrations-tab" slot="tab">Source Registrations</div>
    <div id="triggers-tab" slot="tab">Trigger Registrations</div>
    <div id="event-level-reports-tab" slot="tab">Event-Level Reports</div>
    <div id="aggregatable-reports-tab" slot="tab">Aggregatable Reports</div>
    <div id="debug-reports-tab" slot="tab">Verbose Debug Reports</div>
    <div id="os-tab" slot="tab">OS Registrations</div>
    <div slot="panel">
      <h2>Active Sources</h2>
      <div class="content">
        <attribution-internals-table id="sourceTable">
        </attribution-internals-table>
      </div>
    </div>
    <div slot="panel">
      <h2>Source Registrations</h2>
      <div class="content">
        <attribution-internals-table id="sourceRegistrationTable">
        </attribution-internals-table>
      </div>
    </div>
    <div slot="panel">
      <h2>Trigger Registrations</h2>
      <div class="content">
        <attribution-internals-table id="triggerTable">
        </attribution-internals-table>
      </div>
    </div>
    <div slot="panel">
      <h2>Sent and Pending Event-Level Reports</h2>
      <div class="content">
        <div>
          <button id="send-reports" disabled>Send Selected Pending Event-Level Reports</button>
          <label id="show-debug-event-reports"><input type="checkbox" checked>Show Attribution-Success Debug Reports<span></span></label>
        </div>
        <attribution-internals-table id="reportTable">
        </attribution-internals-table>
      </div>
    </div>
    <div slot="panel">
      <h2>Sent and Pending Aggregatable Reports</h2>
      <div class="content">
        <div>
          <button id="send-aggregatable-reports" disabled>Send Selected Pending Aggregatable Reports</button>
          <label id="show-debug-aggregatable-reports"><input type="checkbox" checked>Show Attribution-Success Debug Reports<span></span></label>
        </div>
        <attribution-internals-table id="aggregatableReportTable">
        </attribution-internals-table>
      </div>
    </div>
    <div slot="panel">
      <h2>Verbose Debug Reports</h2>
      <div class="content">
        <attribution-internals-table id="debugReportTable">
        </attribution-internals-table>
      </div>
    </div>
    <div slot="panel">
      <h2>OS Registrations</h2>
      <div class="content">
        <attribution-internals-table id="osRegistrationTable">
        </attribution-internals-table>
      </div>
    </div>
  </cr-tab-box>
</main>
</body>
</html>
